home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1995 January
/
Simtel - 10000 MSDOS Shareware Programs (Walnut Creek)(January 1995)(Disc 2).ISO
/
disc2
/
lan
/
pcwatch.upd
< prev
next >
Wrap
Text File
|
1987-04-14
|
4KB
|
178 lines
To: booth
Subject: PCWATCH Patch
Date: Thu, 09 Oct 86 08:29:41 -0500
From: jac@mimsy.umd.edu
Here is the patch for PCWATCH in it's final form.
Please feel free to post it to TRN-digest if you see fit.
** Delete this line and those preceeding **
n pcwatch.com
l
a 1e49
;
; This debug script will patch the IBM PDS program PCWATCH
; to properly format Token Ring CCBs when processing a 5C interrupt.
; Previously, PCWATCH would only handle NETBIOS NCBs.
;
; The output will be a new version of PCWATCH, named PCWCCB.
;
; To run the script enter the following line to DOS in the directory
; where PCWATCH.COM is located: DEBUG <UPD.SCR
;
; This has been tested with PCWATCH version 1.00, dated 07-01-85,
; 34,892 bytes long.
;
; Patch version 1.00, 24 Sept 86, by Joseph A. Cimmino, Jr.
; University of Maryland, (301) 454-2946, ARPA: jac@maryland.
;
; Refer to the IBM Token-Ring Network PC Adapter Technical Reference,
; 6165876, for information on CCBs.
;
; A CCB is displayed in the following format:
;
; Offset Field_Name Displayed as
;
; 0 CCB_Adapter Byte
; 1 CCB_Command Byte
; 2 CCB_RetCode Byte
; 3 CCB_Work Byte
; 4 CCB_Pointer Address (Word:Word)
; 8 CCB_Appendage Address (Word:Word)
; 0Ch CCB_ParmTab Address (Word:Word)
;
; Note: ParmTab is often a pointer to a parameter table. Sometimes,
; however, it contains data values - so be careful of byte ordering!
;
jmp 224 ; go to the patch area
nop ; be clean
nop
nop
a 224
mov di,cs ; establish addressability to PCWatch's data
mov es,di
cs:
mov ds,[bx+1e] ; get user's ES
cs:
mov si,[bx+14] ; get user's BX
mov al,[si] ; ES:BX points to NCB/CCB
cmp al,04 ; is this a CCB or NCB?
mov ds,di ; leave with addressability
jb 23b ; CCB, continue with our code.
jmp 1e4f ; NCB, return to PCW's routine.
;
; Copy the " CCB [" header to the output buffer
;
mov si,2E0 ; our header
mov di,1930 ; the output buffer
mov cx,8 ; length
cld
repz
movsb
;
; Clear output buffer
;
push di ; save start address
mov cx,48 ; (80 bytes - 8 byte header)
mov al,20 ; to blank
repz
stosb
pop di ; restore start address
;
; Now set our DS:SI to user's ES:BX (CCB)
;
cs:
mov ds,[bx+1e]
cs:
mov si,[bx+14]
;
; format the adapter number (CCB + 0)
;
mov al,[si]
call 136E ; HEX_BYTE
inc di ; add a blank
;
; format the command (CCB + 1)
;
mov al,[si+1]
call 136E ; HEX_BYTE
inc di
;
; format the return code (CCB + 2)
;
mov al,[si+2]
call 136E ; HEX_BYTE
inc di
;
; format the work area (CCB + 3)
;
mov al,[si+3]
call 136E ; HEX_BYTE
inc di
;
; format the queue pointer (CCB + 4)
;
mov dx,[si+6]
call 1340 ; HEX_WORD
mov al,3A ; ':'
stosb
mov dx,[si+4]
call 1340 ; HEX_WORD
inc di
;
; format the command complete appendage pointer (CCB + 8)
;
mov dx,[si+0A]
call 1340 ; HEX_WORD
mov al,3A ; ':'
stosb
mov dx,[si+8]
call 1340 ; HEX_WORD
inc di
;
; format the Parameters or Parm table pointer (CCB + 0C)
;
mov dx,[si+0E]
call 1340 ; HEX_WORD
mov al,3A ; ':'
stosb
mov dx,[si+0C]
call 1340 ; HEX_WORD
inc di
;
; finish up the line
;
mov al,5D ; ']'
stosb
;
; restore regs
;
pop di
pop si
pop es
pop ds
;
; display the line (1930) with attributes (103E) for 50h chars.
;
lea si,[1930]
mov cx,50
lea bx,[103E]
call 119D
;
; clear carry and return
;
clc
ret
a 2e0
;
; output line header
;
db " CCB ["
n pcwccb.com
w
q